package fm.last.api
{
    import fm.last.BaseTC;
    

    public class LibraryAPITest extends BaseTC
    {
        
        
        public function LibraryAPITest()
        {
            super(); 
            addTest("testAddAlbum");
            addTest("testAddArtist");
            addTest("testAddTrack");
            addTest("testGetAlbums");
            addTest("testGetArtists");
            addTest("testGetTracks");          
        }
     
        public function testAddAlbum():void
        {
            lfm_service.library.addAlbum(okNoContent, unexpectedError, "Björk", "Post");
        }
        
        public function testAddArtist():void
        {
            lfm_service.library.addArtist(okNoContent, unexpectedError, "Björk");
            lfm_service.library.addArtist(unexpectedComplete, expectedError, "I_Bet_No_Such_Artist");
        }
        
   
        public function testAddTrack():void
        {
            lfm_service.library.addTrack(okNoContent, unexpectedError, "Björk", "Hunter");            
        }
        
        public function testGetAlbums():void
        {
            lfm_service.library.getAlbums(expectedPattern("lfm/albums"), unexpectedError, "joanofarctan");
        }
        
        public function testGetArtists():void
        {
            lfm_service.library.getArtists(expectedPattern("lfm/artists"), unexpectedError, "joanofarctan");
        }
        
        public function testGetTracks():void
        {
            lfm_service.library.getTracks(expectedPattern("lfm/tracks"), unexpectedError, "joanofarctan");            
        }
        
    }
}